package br.ita.battlefarm.moves;

import br.ita.battlefarm.R;
import br.ita.battlefarm.core.Board;

public class NormalMove extends Move {
	
	public NormalMove(){
		_allowedMoves = -1;
		_backgroundRes = R.drawable.shot_single;
		enableMove();
	}

	@Override
	public int fire(Board board, int i, int j) {
		int changeInScore = 0;
		if(hasMovesLeft()){
			if( board.validPlayPosition(i,j) ){
				_allowedMoves--;
				changeInScore += fireInSquare(board, i, j);
			}
			if(!hasMovesLeft()){
				disableMove();
			}
		}
		return changeInScore;
	}

}
